import request from '@/utils/request'

// 查询应付汇总列表
export function listYfpay(query) {
  return request({
    url: '/supermarket/yfpay/list',
    method: 'get',
    params: query
  })
} 
export function listYfpayFzd(query) {
  return request({
    url: '/supermarket/yfpay/listFzd',
    method: 'get',
    params: query
  })
}
// 查询应付汇总详细
export function getYfpay(yfpayId) {
  return request({
    url: '/supermarket/yfpay/' + yfpayId,
    method: 'get'
  })
}

// 新增应付汇总
export function addYfpay(data) {
  return request({
    url: '/supermarket/yfpay',
    method: 'post',
    data: data
  })
}

// 修改应付汇总
export function updateYfpay(data) {
  return request({
    url: '/supermarket/yfpay',
    method: 'put',
    data: data
  })
}

// 删除应付汇总
export function delYfpay(yfpayId) {
  return request({
    url: '/supermarket/yfpay/' + yfpayId,
    method: 'delete'
  })
}

//审核付款单
export function auditCjPay(data) {
  return request({
    url: '/supermarket/yfpay/audit',
    method: 'post',
    data: data
  })
}
//核销付款单
export function hxCjPay(data) {
  return request({
    url: '/supermarket/yfpay/hxPay',
    method: 'post',
    data: data
  })
}

//反制单
export function updateFzd(data) {
  return request({
    url: '/supermarket/yfpay/Fzd',
    method: 'post',
    data: data
  })
}

